added Feb 2001 SDK
[windows-sources.git] / shared source / wpf / src / host / dll / errorpage.hxx
blob620d3888699104067badafaebb303c8b5c923fa8
1 //+-----------------------------------------------------------------------
2 //
3 // Copyright (c) Microsoft Corporation. All rights reserved.
4 //
5 // Description:
6 // Defines the ErrorPage class of PresentationHost.
7 //
8 // History:
9 // 2005/10/10 - [....]
10 // Created
11 // 2007/09/20-[....]
12 // Ported Windows->DevDiv. See SourcesHistory.txt.
14 //------------------------------------------------------------------------
16 #pragma once
18 class CErrorPage
20 public:
21 // Display() returns only if called on the main thread and the browser is currently blocked.
22 static void Display(__in_ecount(1) BSTR pErrorMsg);
23 static bool IsActive() { return s_fIsActive != 0; }
25 static void SetRect(int x, int y, int width, int height);
26 static bool ExecOleCommand(__in_opt const GUID * pguidCmdGroup, DWORD dwCmdId, DWORD /*nCmdExecOpt*/,
27 __in_opt VARIANT * /*pvarArgIn*/, __out_opt VARIANT * /*pvarArgOut*/);
29 static HRESULT RestartApplication();
31 private:
32 __declspec(align(4)) static volatile LONG s_fIsActive;
33 static DWORD s_threadId;
34 static HWND s_hWnd, s_hRBW;
36 static void DisplayOnAnyThread(__in_ecount(1) BSTR pErrorMsg);
37 static HRESULT LoadAndFixUpHtmlTemplate(__out _bstr_t &htmlTemplate);
38 static bool GetShowDetailsRegistryFlag();
39 static void DisableTextAreaCloseTag(__inout wchar_t *str);
40 static _bstr_t ListLoadedModules();
42 static HRESULT SetUpHostWindow();
43 static LRESULT WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);